package com.situ.pattern.factory;

public class Add extends AbstractCal {

    public Add() {
        //super();
        this(3, 5);
    }

    public Add(Integer num1, Integer num2) {
        //new Cal(num1, num2)
        super(num1, num2);
    }

    @Override
    public int getResult() {
        //super：父类对象
        //return super.getResult();
        return num1 + num2;
    }
}
